<?
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/

if ($displayParams["aFormDisplay"]["bShowFormTag"])
{

    ?>
    <form  action="<?=$displayParams["aFormDisplay"]["action"];?>" method="<?=$displayParams["aFormDisplay"]["method"];?>" name="<?=$displayParams["aFormDisplay"]["sFormName"];?>">
	<?
	    include("button.php");
    	?>

	<div class="wiki_simpleform_padding">
	<?



	for ($i=0; $i<count($displayParams["aFormDisplay"]["aElements"]); $i++)
	{
	    switch ($displayParams["aFormDisplay"]["aElements"][$i]["sType"])
	    {
		case "textarea":
		    ?>
		    
		    <div class="wiki_general_padding">
			<table border="0" width="100%" cellpadding="0" cellspacing="0"><tr><td>
			<textarea
			    name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>"
			    id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
			    ><?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?></textarea>
			</td></tr></table>
		    </div>
		    <?
		    break;
	    
		case "hidden":
		    ?>
		    <input 
			type="hidden" 
			name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" 
			value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>"
			id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
			>
			
		    <?
		    break;
	    
		case "radio":
		    ?>
		   <input 
			type="radio" 
			name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" 
			value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>"
			id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
			<?=$displayParams["aFormDisplay"]["aElements"][$i]["state"];?>
			>            
		    <?=$displayParams["aFormDisplay"]["aElements"][$i]["description"];?>
		    <?
		    break;
		
		
		case "inputtext":
		    ?>
		    <div class="wiki_general_padding">
			<?=$displayParams["aFormDisplay"]["aElements"][$i]["description"];?>
	    
	    
			<input 
			    type="text" 
			    name="<?=$displayParams["aFormDisplay"]["aElements"][$i]["name"];?>" 
			    value="<?=$displayParams["aFormDisplay"]["aElements"][$i]["value"];?>"
			    id="<?=$displayParams["aFormDisplay"]["aElements"][$i]["id"];?>"
			    >
		    </div>
		    <?
		    break;
		
		case "ktmlactivex":
		    require_once('ktml2/includes/ktedit/activex.php');
	    
		    $KT_display = "Cut,Copy,Paste,Insert Table,Toggle Vis/Invis,Toggle WYSIWYG,Bold,Italic,Underline,Align Left,Align Center,Align Right,Align Justify,Background Color,Foreground Color,Undo,Redo,Bullet List,Numbered List,Indent,Outdent,HR,Font Type,Font Size,Insert WikiLink,Clean Word,Introspection,TableEdit";
	    
		    showActivex($displayParams["aFormDisplay"]["aElements"][$i]["id"], '100%', 400, false,$KT_display, "ktml2/", "ktml2/includes/styles/KT_styles.css", "../../../ktml2/images/uploads/", "../../../ktml2/files/uploads/",1, "English (UK)", -1, "english", "yes", "no");
		    
		break;
	    }
	}
    ?>
    </div>
    </form>
    <?
}
?>
